package com.pm.mapper.task;

import com.pm.entity.po.task.LampProportion;
import com.pm.entity.po.task.TaskSubtasks;
import com.pm.entity.po.task.TaskTargetLightUpVo;
import com.pm.entity.po.task.TaskTargetPo;
import com.pm.entity.vo.RepeatSubtasksVo;
import com.pm.entity.vo.StateVo;
import com.pm.entity.vo.task.TaskTargetVo;
import com.pm.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TaskSubtasksMapper extends BaseMapper<TaskSubtasks> {
    List<TaskSubtasks> getListTaskSubtasks(Integer id);

    List<TaskSubtasks> getListTaskSubtasksC(Integer parentId);

    List<TaskSubtasks> getListTaskSubtasksId(Integer id);

    List<TaskSubtasks> sort(Integer id);

    List<RepeatSubtasksVo> repeatSubtasks(@Param("targetName") String targetName);

    List<RepeatSubtasksVo> repeat();

    List<StateVo> State1(TaskSubtasks taskSubtasks);

    List<StateVo> State2(TaskSubtasks taskSubtasks);

    List<StateVo> State3(TaskSubtasks taskSubtasks);

    List<StateVo> State4(TaskSubtasks taskSubtasks);

    // 修改状态
    Integer updateNew1(TaskSubtasks taskSubtasks);

    Integer updateNew2(TaskSubtasks taskSubtasks);

    Integer updateNew3(TaskSubtasks taskSubtasks);

    Integer updateNew4(TaskSubtasks taskSubtasks);

    //修改灯的状态
    Integer updateLamp1(TaskSubtasks taskSubtasks);

    Integer updateLamp2(TaskSubtasks taskSubtasks);

    Integer updateLamp3(TaskSubtasks taskSubtasks);

    Integer updateLamp4(TaskSubtasks taskSubtasks);

    Integer updateSocre1(TaskSubtasks taskSubtasks);

    Integer updateSocre2(TaskSubtasks taskSubtasks);

    Integer updateSocre3(TaskSubtasks taskSubtasks);

    Integer updateSocre4(TaskSubtasks taskSubtasks);

    List<TaskSubtasks> getListALL(TaskSubtasks taskSubtasks);

    List<TaskSubtasks> getListQuarter(TaskSubtasks taskSubtasks);

    List<TaskSubtasks> getListQuarter1(TaskSubtasks taskSubtasks);

    List<TaskSubtasks> getListQuarter2(TaskSubtasks taskSubtasks);

    List<TaskSubtasks> getListQuarter3(TaskSubtasks taskSubtasks);

    List<TaskSubtasks> getListQuarter4(TaskSubtasks taskSubtasks);

    TaskSubtasks getListOne(Integer id);

    List<Integer> getTaskIds();

    List<LampProportion> getLamp(Integer id);

    /**
     * 根据taskId获取目标任务数量
     * @param id
     * @return
     */
    Integer getAllNum(Integer id);

    String gettaskName(Integer id);

    List<Integer> getAllSubtasks(Integer taskId);

    LampProportion getSubtasksLamp(Integer subtasksId);

    String getTargetName(Integer subtasksId);

    /**
     * 获取工作目标完成进度
     * @param taskTargetVo
     * @return
     */
    List<TaskTargetPo> getTaskTargetFinishRate(TaskTargetVo taskTargetVo);

    /**
     * 获取任务目标总量及亮等比例
     * @param taskTargetVo
     * @return
     */
    List<TaskTargetLightUpVo> getTaskTargetLightUpRate(TaskTargetVo taskTargetVo);

    /**
     * 删除目标任务的子任务
     * @param taskDistribution
     * @return
     */
    Integer removeTaskByParentId(TaskSubtasks taskDistribution);

    /**
     * 查询任务进度列表
     * @param taskDistribution
     * @return
     */
    List<TaskSubtasks> getTaskSpeedList(TaskSubtasks taskDistribution);
}